package com.ywl.exercise.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Basic;


@Table(name = "images", schema = "", catalog = "crazyguessimages")//对应的表名和数据库名
@Entity
public class ImageEntity {
	private int imageid; //图片编号
	private int categoryid; //类别编号
	private String url; //图片地址
	private int mark; //当前分值
	private String answer; //答案
	
	@Column(name = "imageid", nullable = false, insertable = true, updatable = true, length = 11, precision = 0)
    @Id //自增的id，主键
    @GeneratedValue
    public int getImageid() {
		return imageid;
	}
	public void setImageid(int imageid) {
		this.imageid = imageid;
	}
	
	@Column(name = "categoryid", nullable = true, insertable = true, updatable = true, length = 11, precision = 0)
    @Basic
    public int getCategoryid() {
		return categoryid;
	}
	public void setCategoryid(int categoryid) {
		this.categoryid = categoryid;
	}
	
	@Column(name = "url", nullable = true, insertable = true, updatable = true, length = 50, precision = 0)
	@Basic
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	
	@Column(name = "mark", nullable = true, insertable = true, updatable = true, length = 11, precision = 0)
	@Basic
	public int getMark() {
		return mark;
	}
	public void setMark(int mark) {
		this.mark = mark;
	}
	
	@Column(name = "answer", nullable = true, insertable = true, updatable = true, length = 100, precision = 0)
	@Basic
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}
}
